// function SuperType(){
//     this.color = ['red','green','blue'];
// }
// function SubType(){
//     SuperType.call(this)
// }
// let instance1 = new SubType();
// instance1.color.push('black');
// console.log(instance1.color);//[ 'red', 'green', 'blue', 'black' ]
// let instance2 = new SubType();
// console.log(instance2.color);//[ 'red', 'green', 'blue' ]

function SuperType(name){
    this.name = name;
}
function SubType(name,age){
    SuperType.call(this,name);
    this.age = age;
}
let instance = new SubType('silly','26');
console.log(instance);//SubType { name: 'silly', age: '26' }
